<template>
  <div class="weui-msg">
    <div class="weui-msg__icon-area">
	  <i class="weui-icon_msg" :class="{'weui-icon-success':type=='success', 'weui-icon-warn':type=='warn'}">
	  </i>
	</div>
    <div class="weui-msg__text-area">
      <h2 class="weui-msg__title">{{title}}</h2>
      <p class="weui-msg__desc">
	    <!--内容详情，可根据实际需要安排，如果换行则不超过规定长度，居中展现<a href="javascript:void(0);">文字链接</a>-->
		<slot>
		</slot>
	  </p>
    </div>
    <div class="weui-msg__opr-area">
      <p class="weui-btn-area">
        <a href="javascript:;" class="weui-btn weui-btn_primary" v-for="(item, index) in list" @click="$emit('on-click', index)"
		  :class="{'weui-btn_primary':index==0, 'weui-btn_default':index!=0}">
		  {{item}}
		</a>
      </p>
    </div>
    <!--<div class="weui-msg__extra-area">
      <div class="weui-footer">
        <p class="weui-footer__links">
          <a href="javascript:void(0);" class="weui-footer__link">底部链接文本</a>
        </p>
        <p class="weui-footer__text">Copyright &copy; 2008-2016 weui.io</p>
      </div>
    </div>-->
  </div>
</template>

<script>
export default {
  props: {
    title: {
	  type: String,
	  default: ''
	},
	list: Array,
	type: {
	  type: String,
	  default: 'success'
	}
  }
}
</script>

<style>
@import 'weui/dist/style/weui.min.css';
</style>
